<!DOCTYPE html>
<html lang="zh-cn">
    <head>
        <meta charset="UTF-8"/>
        <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
        <title>elementUI表格排序</title>
        <link rel="stylesheet" href="elementUI/theme-default/index.css" /> 
    </head>
    <body>
        <div id="app">
            <template>
                <el-table :data="dataTable" border :default-sort="{prop:'date',order:'descending'}">
                    <el-table-column prop="date" label="日期" sortable width="180"></el-table-column>
                    <el-table-column prop="name" label="姓名" sortable width="180"></el-table-column>
                    <el-table-column prop="address" label="地址" width="180"></el-table-column>
                </el-table>
            </template>
        </div>
        <script src="js/vue.js"></script>
        <script src="elementUI/index.js"></script>
        <script>
        new Vue({
            el:'#app',
            data() {
                return {
                    dataTable:[
                    {
                        name:'邓小虎',
                        address:'湖南宁远中和镇邓家村二组',
                        date:'1991-11-16'
                    },{
                        name:'白小兔',
                        address:'河北邯郸',
                        date:'1993-10-16'
                    },{
                        name:'邓小宝',
                        address:'河北邯郸',
                        date:'2018-08-06'
                    }
                    ]
                }
            }
        })
        </script>
    </body>
</html>